<template>
	<u-popup :show="sexChangeShow" :round="10" closeOnClickOverlay @close="sexChangeShow = false">
		<view class="fw-5">
			<view
				v-for="(item, index) in dayList"
				:key="index"
				class="linh-44 tc borderB"
				:class="{ colorZS: defaultValue === index }"
        @click="handChange(index)"
				>{{ item }}</view
			>
		</view>
	</u-popup>
</template>

<script>
export default {
  props: ['defaultValue'],
	data() {
		return {
			dayList: ["今天", "昨天", "本周", "本月", "截止累计"],
			sexChangeShow: false,
		};
	},
	methods: {
		openModal() {
			this.sexChangeShow = true;
		},
    handChange(index) {
      this.$emit('change', index);
      this.sexChangeShow = false;
    }
	},
};
</script>

<style lang="scss" scoped></style>
